package com.woniu.market_stall.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.market_stall.mapper.StallDetailMapper;
import com.woniu.market_stall.vo.StallDetailVo;
import com.woniu.market_stall.vo.StallVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StallDetailService {
    @Autowired
    StallDetailMapper stallDetailMapper;

    /**
     * 根据条件查询 摊位详情
     * @param now 当前页面
     * @param size 页面大小
     * @param username username
     * @param status 状态
     * @param stallId 摊位的id
     * @return
     */
    public PageInfo<StallDetailVo> queryStallDetailByPage(Integer now , Integer size ,  String username ,  String status ,  int stallId){
        PageHelper.startPage(now , size);
        List<StallDetailVo> list = stallDetailMapper.selectDetailByCons(username, status , stallId);
        return new PageInfo<>(list);
    }

}
